//
//  XZLotteryHeaderView.m
//  生活小助手
//
//  Created by MAC－ME on 14-8-8.
//  Copyright (c) 2014年 lxz. All rights reserved.
//

#import "XZLotteryHeaderView.h"

@implementation XZLotteryHeaderView

- (id)initWithFrame:(CGRect)frame
{
    self = [super initWithFrame:frame];
    if (self) {
        self.height = 30;
        
        UILabel *lotteryLabel = [self setupLabelWithText:@"种类"];
        lotteryLabel.width = 70;
        lotteryLabel.x= 0;
        
        UILabel *lottery_noLabel = [self setupLabelWithText:@"期号"];
        lottery_noLabel.width = 40;
        lottery_noLabel.x= CGRectGetMaxX(lotteryLabel.frame);
        
        UILabel *lottery_timeLabel = [self setupLabelWithText:@"日期"];
        lottery_timeLabel.width = 70;
        lottery_timeLabel.x = CGRectGetMaxX(lottery_noLabel.frame);
        
        UILabel *lottery_numsLabel = [self setupLabelWithText:@"开奖号码"];
        lottery_numsLabel.width = 70;
        lottery_numsLabel.x = CGRectGetMaxX(lottery_timeLabel.frame);
        
        UILabel *lottery_salesLabel = [self setupLabelWithText:@"销量"];
        lottery_salesLabel.width = 70;
        lottery_salesLabel.x = CGRectGetMaxX(lottery_numsLabel.frame);
    }
    return self;
}
- (UILabel *)setupLabelWithText:(NSString *)text
{
    UILabel *label = [[UILabel alloc]init];
    [self addSubview:label];
    label.y = 0;
    label.layer.borderWidth = .5f;
    label.layer.borderColor = ([UIColor orangeColor].CGColor);
    label.textAlignment = NSTextAlignmentCenter;
    label.height = self.height;
    label.text = text;
    return label;
}
- (void)layoutSubviews
{
    [super layoutSubviews];
    
}
@end
